<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
	<head>

		<title>教师</title>
		<!-- Bootstrap core CSS -->
		<link href="../static/asserts/css/bootstrap.min.css" th:href="@{/asserts/css/bootstrap.min.css}" rel="stylesheet">
        <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.js"></script>
        <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.css" rel="stylesheet">
		<link href="../static/asserts/css/dashboard.css" th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">
		<style type="text/css">
			/* Chart.js */
			
			@-webkit-keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}
			
			@keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}
			
			.chartjs-render-monitor {
				-webkit-animation: chartjs-render-animation 0.001s;
				animation: chartjs-render-animation 0.001s;
			}
		</style>
	</head>

	<body>
<div th:replace="sidbar::#topbar"></div>

		<div class="container-fluid">
			<div class="row">
				<div th:replace="sidbar::#sbar(activeUri='main.html')"></div>

				<main role="main"  class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
					<div class="chartjs-size-monitor"  style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: hidden; pointer-events: none; visibility: hidden; z-index: -1;">
						<div class="chartjs-size-monitor-expand" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;">
							<div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div>
						</div>
						<div class="chartjs-size-monitor-shrink" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;">
							<div style="position:absolute;width:200%;height:200%;left:0; top:0"></div>
						</div>
					</div>


                    <div th:if="${teacher.getId()==session.teaAll.getId()}" class="panel panel-success" style="text-align: center;margin: auto;width: 600px;font-size:medium">
                        <div class="panel-heading">
                            <h class="panel-body">个人信息： </h>
                        </div>
                        <a class="btn-outline-info" th:href="@{/selStu(id=${session.teaAll.getId()})}">我的学生</a>
                        <div class="panel-heading">
                            <h3 class="panel-title">我的名字:[[${teacher.getName()}]] </h3>
                        </div>
                        <div class="panel-body">
                            我的帐号：  [[${teacher.getZh()}]]
                        </div>
                        <div class="panel-heading">
                            <h3 class="panel-title"> 年龄：   [[${teacher.getAge()}]] &nbsp;&nbsp; </h3>
                        </div>
                        <div class="panel-body" th:text="${teacher.getSex()}==1?'性别：男':'性别：女'">
                        </div>
                        <div class="panel-heading">
                            <h3 class="panel-title" th:text="${#dates.format(teacher.getRegistTime(),'注册时间：yyyy-MM-dd HH:mm:ss')}"> 注册时间： [[${teacher.getRegistTime()}]] </h3>
                        </div>
                        <div class="panel-body"  th:text="${#dates.format(teacher.getLoginTime(),'登录时间：yyyy-MM-dd HH:mm:ss')}">
                            登录时间：[[${teacher.getLoginTime()}]]
                        </div>
                        <div class="panel-heading">
                            <h3 class="panel-title">我教的班级：
                                <a th:each="cla:${cname}" th:if="${cla.getId()!=100}" th:href="@{/selStuByCid(id=${cla.getId()})}" th:text="${cla.getName()}+' | '"></a>
                            </h3>
                        </div>
                        <div class="panel-body">
                            <a class="btn-outline-primary" th:href="@{/selectPerms(perms=${teacher.getPerms()})}" th:text="${teacher.getPerms()=='teacher'?'身份：教师':'身份：管理员'}" th:if="${teacher.getPerms()!='yk'}"></a>
                            <a class="btn-outline-primary" th:href="@{/selectPerms(perms=${teacher.getPerms()})}" th:text="${'身份：游客'}" th:if="${teacher.getPerms()=='yk'}"></a>
                            <a  class="btn-outline-primary" shiro:hasPermission="root" th:href="@{/toSetPerms(id=${teacher.getId()})}" th:text="修改身份"></a>
                        </div>
                        <div class="panel-heading">
                            <a class="btn-outline-success" th:href="@{/toUpdTea(id=${session.teaAll.getId()})}">修改基本信息</a>
                            <a class="btn-outline-success" th:href="@{/toUpdTeaPwd(id=${session.teaAll.getId()})}">修改密码</a>
                            <a class="btn-outline-success" th:href="@{/selCoAll}">返回教师信息</a>
                        </div>

                    </div>

<!--                    同事的详细信息-->
                    <div th:if="${teacher.getId()!=session.teaAll.getId()}" class="panel panel-success" style="text-align: center;margin: auto;width: 600px;font-size:medium">
                        <div class="panel-heading">
                            <h2 class="panel-body" th:text="${teacher.getName()}+'的个人信息:'"> </h2>
                        </div>
                        <a th:href="@{/selOStu(id=${teacher.getId()})}" th:text="${teacher.getSex()==1?'他的的学生':'她的学生'}"></a>
                        <div class="panel-heading">
                            <h3 class="panel-title">名字:[[${teacher.getName()}]] </h3>
                        </div>
                        <div class="panel-body" th:text="${teacher.getSex()==1?'他的的帐号:'+teacher.getZh():'她的帐号:'+teacher.getZh()}">
                        </div>
                        <div class="panel-heading">
                            <h3 class="panel-title"> 年龄：   [[${teacher.getAge()}]] &nbsp;&nbsp; </h3>
                        </div>
                        <div class="panel-body" th:text="${teacher.getSex()}==1?'性别：男':'性别：女'">
                        </div>
                        <div class="panel-heading">
                            <h3 class="panel-title" th:text="${#dates.format(teacher.getRegistTime(),'注册时间：yyyy-MM-dd HH:mm:ss')}"> 注册时间： [[${teacher.getRegistTime()}]] </h3>
                        </div>
                        <div class="panel-body"  th:text="${#dates.format(teacher.getLoginTime(),'登录时间：yyyy-MM-dd HH:mm:ss')}">
                            登录时间：[[${teacher.getLoginTime()}]]
                        </div>
                        <div class="panel-heading" >
                            <h3 class="panel-title" >
                               [[${teacher.getSex()==1?'他教的班级：':'她教的班级：'} ]]<a  th:each="cla:${cname}" th:if="${cla.getId()!=100}"  th:href="@{/selStuByCid(id=${cla.getId()})}" th:text="${cla.getName()}+' | '"></a>
                            </h3>
                        </div>
                        <div class="panel-body">
                                <a th:href="@{/selectPerms(perms=${teacher.getPerms()})}" th:text="${teacher.getPerms()=='teacher'?'身份：教师':'身份：管理员'}" th:if="${teacher.getPerms()!='yk'}"></a>
                            <a  th:href="@{/selectPerms(perms=${teacher.getPerms()})}" th:text="${'身份：游客'}" th:if="${teacher.getPerms()=='yk'}"></a>
                            <a  shiro:hasPermission="root" th:href="@{/toSetPerms(id=${teacher.getId()})}" th:text="修改身份"></a>
                            <a th:href="@{/selCoAll}">返回教师信息</a>
                        </div>
                    </div>


				</main>
			</div>
		</div>


	</body>

</html>